package com.tang.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tang.crm.dto.CustomerOrderDto;
import com.tang.crm.entity.CustomerOrder;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface CustomerOrderMapper extends BaseMapper<CustomerOrder> {

    IPage<Map<String, Object>> selectAllByParams(IPage<CustomerOrder> page, @Param("params") CustomerOrderDto customerOrderDto);

    @MapKey("id")
    Map<String, Object> selectOrderById(@Param("orderId") Integer orderId);

    CustomerOrder selectLossCustomerOrderByCustomerId(@Param("customerId") Integer customerId);
}
